<template>
	<view>
		<view style="position: sticky;top: 0;">
		<u-navbar  back-icon-color="#fff" :back-text-style="{color:'#fff'}"  :border-bottom="false" :is-back="true" back-text="巡检确认" :background="{ background:'#357BED'}"></u-navbar>
			<view class="" style="background-color: white;">
				<view class="search">
					<u-search @search="search" shape="square" :show-action="false" input-align="center" placeholder="搜索"
						v-model="keyword"></u-search>
				</view>
				
				<view class="select">
					<u-dropdown active-color="#357BED">
						<u-dropdown-item v-model="value3" title="单位区域" :options="options3"></u-dropdown-item>
						<u-dropdown-item v-model="value2" title="任务状态" :options="options2"></u-dropdown-item>
					</u-dropdown>
				</view>
			</view>
			<view class="" style="margin-top: 100rpx;">
				<u-empty text="暂无数据!" mode="list"></u-empty>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1: 1,
				value2: 2,
				value3: 1,
				options1: [{
						label: '防雷监测',
						value: 1,
					},
					{
						label: '接地电阻',
						value: 2,
					},
					{
						label: '峰值记录仪',
						value: 3,
					}
				],
				options2: [{
						label: '在线',
						value: 1,
					},
					{
						label: '离线',
						value: 2,
					},
				],
				options3: [],
			}
		},
		onLoad(option) {
			this.userInfo=this.$util.getUserInfo()
			this.getRegion()
		},
		onReady() {

		},
		computed: {

		},
		methods: {
			search(val) {
				console.log(val)
			},
			getRegion() {
				this.$axios.post('Region/XGetRegion',this.userInfo, p => {
					p.data.map(item => {
						this.options3.push({
							label: item.RegionTitle,
							value: item.ID
						})
					})
				})
			}
		},



	}
</script>

<style lang="scss">
	.search,
		{
		padding:20rpx;
		background-color: white;
		margin-top: 20rpx;
	}

	.select {
		padding: 10rpx 0;
		background-color: white;
		margin-top: 20rpx;
	}
</style>
